<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ProfileController
 *
 * @author jean
 */
class ProfileController extends Zend_Controller_Action {
    
    public function preDispatch()
    {
        require_once APPLICATION_PATH . '/forms/Forms_UploadImage.php';
    }
    
    
    public function insertimageAction()
    {
        $upload = new Forms_UploadImage();
        $upload->setAction("/profile/reciveform"); //se seta para onde o submit levar?    
        echo $upload;        
    }
    
    public function reciveformAction()
    {
        $form = new Forms_UploadImage;
        $data = $this->_request->getPost();
        
        if($this->getRequest()->isPost())
        {
            if($form->isValid($data))
            {
//                umask(0); 
//                mkdir("../model/fotos/albuns/$nome", 0777, true);				
		
                print_r($_POST);
            }
        }
    }
}

?>
